def prostoe(a):   
    ypi=0
    for i in range(2,int (a**0.5)+1):
        if a%i==0:
            ypi+=1
    if ypi>1:
        print("ne prostoe")
    else:
        print("prostoe")
    
NO= list(input().split())
a=0

ab = 0
slov=["zero","one","two","three","four","five","six","seven","eight","nine"]#10

        

        
for i in range(len(NO)):                
    if len(NO)!= 3 or NO[i]not in slov: 
        ab+=1
        
if ab == 0:    
    for i in range(10):  
        if NO[0]==slov[i]:
            a+=i*100


        if NO[1]==slov[i]:
            a+=i*10

        if NO[2]==slov[i]:
            a+=i*1
    print (a)
    prostoe(a)




            
if ab > 0:
    print("Wrong input")
   
